<template>
  <!--  底部tap组件-->
  <div class="bottom" v-if="isShow">
    <van-tabbar route>
      <van-tabbar-item icon="home-o" name="home" replace :to="{name:'home'}">首页</van-tabbar-item>
      <van-tabbar-item icon="shopping-cart-o" name="buycar" info="1" :to="{name:'buycar'}">购物车</van-tabbar-item>
      <van-tabbar-item icon="gem-o" name="vip" replace :to="{name:'vip'}">会员</van-tabbar-item>
      <van-tabbar-item icon="search" name="search" replace :to="{name:'search'}">搜索</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
    import { Tabbar, TabbarItem} from "vant"
    export default {
        name: "Bottom",
        data(){
            return {
                isShow:true
            }
        },
        components:{
            [Tabbar.name]:Tabbar,
            [TabbarItem.name]:TabbarItem,
        },
        methods:{

        },
        created(){
            this.$event.$on('show',(tag)=>{
                this.isShow = tag
            })
        }
    }
</script>

<style scoped>

</style>
